{% load static %}
{% load project %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>
        {% block title %}{% endblock %}
    </title>
    <link rel="stylesheet" href="{% static 'plugings/bootstrap-4.6.2-dist/css/bootstrap.min.css' %}">
    <link rel="stylesheet" href="{% static 'plugings/fontawesome-free-5.15.4-web/css/fontawesome.min.css' %}">
    <link rel="stylesheet" href="{% static 'plugings/fontawesome-free-5.15.4-web/css/all.min.css' %}">
    <style>
        .fontstyle {
            font-size: 20px;
            margin-top: 5px;
            color: white !important;
        }

        .listyle {
            height: 60px;
        }

        .listyle:hover {
            background-color: #3188e8;
        }
        .listyle.active {
        background-color: #3188e8; /* 激活时背景色 */
        }

    </style>
    {% block css %}
    {% endblock %}
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light" style="background: #1075e3; height: 60px">
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo03"
            aria-controls="navbarTogglerDemo03" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>
    <a class="navbar-brand" href="{% url 'project_list' %}" style="font-size: 35px; color: white">Tracer</a>

    <div class="collapse navbar-collapse" id="navbarTogglerDemo03">

        <ul class="navbar-nav mr-auto mt-2 mt-lg-0">
            {#            <li class="nav-item dropdown listyle">#}
            {#                <a class="nav-link dropdown-toggle fontstyle" href="#" role="button" data-toggle="dropdown" aria-expanded="false">#}
            {#                    项目#}
            {#                </a>#}
            {#                <div class="dropdown-menu">#}
            {#                    <a class="dropdown-item" href="#">Action</a>#}
            {#                    <a class="dropdown-item" href="#">Another action</a>#}
            {#                    <div class="dropdown-divider"></div>#}
            {#                    <a class="dropdown-item" href="#">Something else here</a>#}
            {#                </div>#}
            {#            </li>#}
            {% all_project_list request %}

            {#判断是否进入项目#}
            {% if request.tracer.project %}

                {% manage_menu_list request %}
            {% endif %}
        </ul>

        <form class="form-inline my-2 my-lg-0">
            <ul class="navbar-nav mr-auto mt-2 mt-lg-0">
                <li class="nav-item ">
                    <a class="nav-link " href="#"><span style="color:white;font-size: 20px">工作台</span></a>
                </li>
                <li class="nav-item ">
                    <a class="nav-link " href="#"><span style="color: white;font-size: 20px">日历</span></a>
                </li>
                <li class="nav-item ">
                    <a class="nav-link " href="#"><span style="color: white;font-size: 20px">|</span></a>
                </li>
                <li class="nav-item ">
                    <a class="nav-link " href="#"><i class="far fa-bell"
                                                     style="color: white;font-size: 20px;margin-top: 8px;margin-right: 10px"></i>
                    </a>
                </li>
                <li class="nav-item ">
                    <a class="nav-link " href="#"><i class="fas fa-bookmark "
                                                     style="color: white;font-size: 20px;margin-top: 8px"></i> </a>
                </li>
            </ul>
            {% if request.tracer.user %}
                <a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown"
                   style="color: white"><span
                        style="color: white;font-size: 28px">{{ request.tracer.user.username }}</span></a>
                <div class="dropdown-menu" style="margin-left: 1500px;">
                    <a class="dropdown-item" href="{% url 'index' %}">官网</a>
                    <div class="dropdown-divider"></div>
                    <a class="dropdown-item" href="{% url 'logout' %}">退出</a>
                </div>
            {% endif %}
        </form>
    </div>
</nav>
{% block content %}{% endblock %}
<script src="{% static 'plugings/bootstrap-4.6.2-dist/jquery/jquery.js' %}"></script>
<script src="{% static 'plugings/bootstrap-4.6.2-dist/js/bootstrap.bundle.min.js' %}"></script>
<script src="{% static 'plugings/bootstrap-4.6.2-dist/js/bootstrap.min.js' %}"></script>
{% block js %}{% endblock %}
</body>
</html>